let ModulesFile = import.meta.glob('./*.js', {eager:true});

let arr = [];

// 获取值，再用map遍历
Object.values(ModulesFile).map(el => {
    if (el.default) {
        arr.push(...el.default);
    }
});

let business = {
    path: '/shopcart',
    name: 'ShopCart',
    children: [
        {path: '', component: () => import('components/shopcart/ShopCart.vue'), meta:{Login: true}},
        ...arr
    ]
}

export default business;